import VueRouter from 'vue-router'
import Vue from 'vue'
import home from "./components/tabbar/home.vue"
import search from "./components/tabbar/search.vue"
import member from "./components/tabbar/member.vue"
import shopcar from "./components/tabbar/shopcar.vue"
import newslist from "./components/news/newslist.vue"
import newsinfo from "./components/news/newsInfo.vue"
import photoslist from "./components/photos/photolist.vue"
import photoinfo from "./components/photos/photoinfo.vue"
import goodsList from "./components/goods/goodsList.vue"
import goodsinfo from "./components/goods/goodsinfo.vue"

import goodsCmt from "./components/goods/goodsCmt.vue"
import goodsDesc from "./components/goods/goodsDesc.vue"
Vue.use(VueRouter)
var router =new VueRouter({
    routes:[
        {path:"/",redirect:"/home"},
        {path:"/home",component:home},
        {path:"/home/newslist",component:newslist},
        {path:"/home/newsinfo/:id",component:newsinfo},
        {path:"/home/photoslist",component: photoslist},
        {path:"/home/photoinfo/:id",component: photoinfo},
        {path:"/home/goodsList",component: goodsList},
        {path:"/home/goodsinfo/:id",component: goodsinfo,name:"goodsinfo"},
        {path:"/home/goodscmt/:id",component: goodsCmt,name:"goodscmt"},
        {path:"/home/goodsdesc/:id",component:goodsDesc,name:"goodsdesc"},
        {path:"/member",component:member},
        {path:"/search",component:search},
        {path:"/shopcar",component:shopcar}
       
    ],
    linkActiveClass:"mui-active"
}
   )

export default router